//
//  AppDelegate.swift
//  cockpit
//
//  Created by Haijun Si on 2020/7/7.
//  Copyright © 2020 chenganrt. All rights reserved.
//

import UIKit
import IQKeyboardManagerSwift

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

//    var window: UIWindow?
//    var mapManager: BMKMapManager?
//    let tabbar = CPBaseTabbarController()

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        
//        setupUI()
        
        return true
    }

//    func setupUI() {
//           let _ = tabbar.setupTabBarStyle(delegate: self as? UITabBarControllerDelegate)
//           
////           #if DEBUG
////           let leftGestureRecognizer = UISwipeGestureRecognizer.init(target: self, action: #selector(showDevSetting))
////           leftGestureRecognizer.numberOfTouchesRequired = 2
////           leftGestureRecognizer.direction = .left
////           tabbar.tabBar.addGestureRecognizer(leftGestureRecognizer)
////
////           let rightGestureRecognizer = UISwipeGestureRecognizer.init(target: self, action: #selector(showDevSetting))
////           rightGestureRecognizer.numberOfTouchesRequired = 2
////           rightGestureRecognizer.direction = .right
////           tabbar.tabBar.addGestureRecognizer(rightGestureRecognizer)
////
////           #endif
//           
//           setIQKeyBoardMethod()
//
//           window?.backgroundColor = .white
//           window?.rootViewController = tabbar
//           window?.makeKeyAndVisible()
//       }
//    
//    
//    func setIQKeyBoardMethod() {
//        let manager = IQKeyboardManager.shared
//        manager.enable = true // 控制整个功能是否启用。
//        manager.shouldResignOnTouchOutside = true // 控制点击背景是否收起键盘
//        manager.shouldToolbarUsesTextFieldTintColor = true  // 控制键盘上的工具条文字颜色是否用户自定义
//        manager.enableAutoToolbar = true // 控制是否显示键盘上的工具条
//        
//        // 最新版的设置键盘的returnKey的关键字 ,可以点击键盘上的next键，自动跳转到下一个输入框，最后一个输入框点击完成，自动收起键盘。
//        manager.toolbarManageBehaviour = IQAutoToolbarManageBehaviour.byTag
//        
//    }
    
    // MARK: UISceneSession Lifecycle

    func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
        // Called when a new scene session is being created.
        // Use this method to select a configuration to create the new scene with.
        return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
    }

    func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
        // Called when the user discards a scene session.
        // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
        // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
    }


}

